import request from '@/plugins/request';

// 获取项目角色列表
export function getRoleList(data) {
    return request({
        url: '/v1/rbac/role/project-list',
        method: 'get',
        params: data
    });
}
// 获取机构角色列表
export function getRoleLists(data) {
    return request({
        url: '/v1/rbac/role/agency-list',
        method: 'get',
        params: data
    });
}
// 新增项目角色
export function addRoleList(data) {
    return request({
        url: '/v1/rbac/role/create-project-role',
        method: 'post',
        data
    });
}
// 新增机构角色
export function addRoleLists(data) {
    return request({
        url: '/v1/rbac/role/create-agency-role',
        method: 'post',
        data
    });
}
// 更新项目角色
export function editRoleList(data) {
    return request({
        url: '/v1/rbac/role/update-project-role',
        method: 'post',
        data
    });
}
// 更新机构角色
export function editRoleLists(data) {
    return request({
        url: '/v1/rbac/role/update-agency-role',
        method: 'post',
        data
    });
}
// 删除项目角色
export function deleteRoleList(data) {
    return request({
        url: '/v1/rbac/role/delete-project-role',
        method: 'post',
        data
    });
}
// 删除机构角色
export function deleteRoleLists(data) {
    return request({
        url: '/v1/rbac/role/delete-agency-role',
        method: 'post',
        data
    });
}
// 获取角色下拉信息
export function getRoleInfo(data) {
    return request({
        url: '/v1/rbac/role/info',
        method: 'get',
        params: data
    });
}

// 项目角色设置权限
export function rolePreSet(data) {
    return request({
        url: '/v1/rbac/role/project-permission',
        method: 'post',
        data
    });
}
// 机构角色设置权限
export function rolePreSets(data) {
    return request({
        url: '/v1/rbac/role/agency-permission',
        method: 'post',
        data
    });
}